import cv2

img = cv2.imread('city.bmp', cv2.IMREAD_GRAYSCALE)
cv2.imwrite('gray.bmp', img)